#include <iostream>
#include "protectedmain.h"

int main(int argc, char** argv)
{
    try
    {
        return protectedMain(argc, argv);
    }
    catch (const std::exception& e)
    {
        std::cerr << "Caught unhandled error:\n";
        std::cerr << e.what() << '\n';
    }
    catch (...)
    {
        std::cerr << "Caught unknown error!\n";
    }
    return EXIT_FAILURE;
}